﻿using Dijiang.Values;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dijiang
{
    public class DError : DValue
    {
        public string message;

        public DError(string message)
        {
            this.message = message;
        }

        public DValue Eval(CmdEnv env)
        {
            return this;
        }

        public DValue Copy()
        {
            return new DError(message);
        }

        public override string ToString()
        {
            return $"Error: {message}";
        }

        public bool Equals(DValue? other)
        {
            return false;
        }
    }
}
